package com.sinog.front.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.http.HttpServletRequest;

/**
 * @author gk
 * @desc 对于特定的请求路径，覆盖默认文件解析器
 * @date 2022/11/2 10:58
 */
@Configuration
public class MyMultipartResolver extends CommonsMultipartResolver {
    @Override
    public boolean isMultipart(HttpServletRequest request) {
        if (request.getRequestURI().contains("/azbj/spgl/upload")) {
            return false;
        }
        return super.isMultipart(request);
    }
}
